package com.example.websocket.pattern.creational.singleton;

public class DoubleSearchSingle {

    private volatile static DoubleSearchSingle doubleSearchSingle;

    private DoubleSearchSingle() {}

    public static DoubleSearchSingle getInstance() {
        if (doubleSearchSingle == null) {
            synchronized (DoubleSearchSingle.class) {
                if (doubleSearchSingle == null) {
                    doubleSearchSingle = new DoubleSearchSingle();
                }
            }
        }
        return doubleSearchSingle;
    }
}
